package Interface;


import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JDialog;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;



public abstract class iDialogGeneral extends JDialog {

	public Dimension label;
	public Dimension datos;
	public Dimension panel;
	private boolean boton;


	private static final long serialVersionUID = 1L;

	public iDialogGeneral(PantallaPrincipal perteneciente, boolean modal) {
		super(perteneciente,modal);
		Dimension tam=new Dimension(400, 500);
		setPreferredSize(tam);
		//setTamanio(tam);

		
		setFont(new Font("Andalus", Font.PLAIN, 14));

		
		panel= new Dimension(1000, 40);
		label=new Dimension(80,30);
		datos= new Dimension(120, 30);


		
		try {
		    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
		        if ("Nimbus".equals(info.getName())) {
		            UIManager.setLookAndFeel(info.getClassName());
		            break;
		        }
		    }
		} catch (Exception e) {
		    //TODO NO SE PUDO PONER EL LOOK AND FEEL
			}

	}
	public void setTamanio(Dimension tam){
		setMinimumSize(tam);
		setMaximumSize(tam);
		setPreferredSize(tam);
	}
	
	public void activarDG(){
		setLocationRelativeTo(getParent());
		setVisible(true);
		getParent().setFocusable(false);

	}
	public boolean isBoton() {
		return boton;
	}
	public void setBoton(boolean boton) {
		this.boton = boton;
	}
	
}
